﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="Gp.Examples.FullCalendar.Core.User, Gp.Examples.FullCalendar.Core" table="users">
    <id name="Id" column="user_id">
      <generator class="native" />
    </id>

    <property name="Email" column ="email"/>
    <property name="LiveIdHash" column ="live_id_hash"/>
    <property name="UserName" column ="user_name"/>

    <bag name="Events" table="events" cascade="all-delete-orphan" inverse="true">
      <key column="user_id"/>
      <one-to-many class="Gp.Examples.FullCalendar.Core.Event, Gp.Examples.FullCalendar.Core"/>
    </bag>

  </class>
</hibernate-mapping>